﻿using UnityEditor;
using UnityEngine;
using System.Collections;

[CustomEditor(typeof(USMessageEvent))]
public class USMessageEventEditor : USEventBaseEditor
{
	new public Rect RenderEvent(Rect myArea, USEventBase thisEvent)
	{
		USMessageEvent messageEvent = thisEvent as USMessageEvent;

		if (!messageEvent)
            Debug.LogWarning("此事件不是USMessageEvent类型, 而是 : " + thisEvent.GetType().ToString());

		DrawDefaultBox(myArea, thisEvent);

		GUILayout.BeginArea(myArea);
			GUILayout.Label("写入日志 :", defaultBackground);
			if (messageEvent)
				GUILayout.Label(messageEvent.message, defaultBackground);
		GUILayout.EndArea();

		return myArea;
	}
}
